package com.tester.zc.test001.third;

/**
 * 题目3.某公司研发星球维护系统，请使用饿汉式单例模式的实现思想，设计编写地球类。
 *
 * @Author zhoucan
 * @Date 2022/12/4
 */
public class EarthTest {
    public static void main(String[] args) {
        for(int i = 1;i <= 3;i++){
            System.out.println("第" + i + "个地球创建中。。。。");
            Earth.getEarth();
        }
        System.out.println("问：三个地球是同一个么?");
        Earth earth1 = Earth.getEarth();
        Earth earth2 = Earth.getEarth();
        Earth earth3 = Earth.getEarth();
        System.out.println(earth1);
        System.out.println(earth2);
        System.out.println(earth3);
    }
}
